package com.proposition.commons.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;

/**
 * 
 * @author yangkai
 *	用户表
 */
@Alias("user")
@TableName("p_user")
public class User extends Model<User> implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private String id;
	private String userName;
	private String password;
	private String realName;
	private String telephone;
	private String createTime;
	private Integer roleId;
	private boolean status;
	
	private Role role;  //用户角色
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getRealName() {
		return realName;
	}
	public void setRealName(String realName) {
		this.realName = realName;
	}
	public String getTelephone() {
		return telephone;
	}
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	public String getCreateTime() {
		return createTime;
	}
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	public Integer getRoleId() {
		return roleId;
	}
	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}
	public boolean isStatus() {
		return status;
	}
	public void setStatus(boolean status) {
		this.status = status;
	}

	
	public Role getRole() {
		return role;
	}
	public void setRole(Role role) {
		this.role = role;
	}
	@Override
	public String toString() {
		return "User [id=" + id + ", userName=" + userName + ", password=" + password + ", realName=" + realName + ", telephone="
				+ telephone + ", createTime=" + createTime + ", roleId=" + roleId + ", status=" + status + ", role=" + role + "]";
	}


	@Override
	protected Serializable pkVal() {
		return this.id;
	}
}
